// DBToolLogin.cpp : implementation file
//

#include "stdafx.h"
#include "DBTool.h"
#include "DBToolDlg.h"
#include "DBToolLogin.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDBToolLogin dialog


CDBToolLogin::CDBToolLogin(CWnd* pParent /*=NULL*/)
	: CDialog(CDBToolLogin::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDBToolLogin)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	parent=pParent;
}


void CDBToolLogin::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDBToolLogin)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDBToolLogin, CDialog)
	//{{AFX_MSG_MAP(CDBToolLogin)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDBToolLogin message handlers

void CDBToolLogin::OnOK() 
{
	CString strUid,strPwd;

	GetDlgItemText(IDC_EDIT_USERNAME,strUid);
	GetDlgItemText(IDC_EDIT_PASSWORD,strPwd);
	((CDBToolDlg*)parent)->SetUidPwd(strUid,strPwd);
	
	CDialog::OnOK();
}
